package com.yopuo.web.config.oss;

import com.yopuo.common.constant.OssConstants;
import com.yopuo.common.utils.bean.BeanUtils;
import com.yopuo.system.service.ISysConfigService;

/**
 * 文件上传Factory
 *
 * @author Mark sunlightcs@gmail.com
 */
public final class OSSFactory {

    public static CloudStorageService build(Integer cloudType){
        //根据云类型，生成对应的云地址
        if(cloudType == OssConstants.CloudService.QINIU.getValue()){
            return new QiniuCloudStorageService();
        }else if(cloudType == OssConstants.CloudService.ALIYUN.getValue()){
            return new AliyunCloudStorageService();
        }else if(cloudType == OssConstants.CloudService.QCLOUD.getValue()){
            return new QcloudCloudStorageService();
        }

        return null;
    }

}
